import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'

//自己写的页面
import Department from './views/org/Department.vue'
import syslog from './views/org/syslog.vue'
import Type from './views/org/Type.vue'
import Detail from './views/org/Detail.vue'
import shop from './views/org/shop.vue'
import T_D from './views/org/T_D.vue'
import ShopRegister from './views/ShopRegister.vue'
import Menu_1 from './views/system/Menu'

let routes = [
    {
        //页面访问路径
        path: '/shopregister',
        //访问上面路径，展示component对应的页面
        component: ShopRegister,
        //给页面取名字，该名字用来在左侧菜单中展示的标题
        name: '',
        //是否隐藏菜单，如果true,就不会在左侧菜单中显示
        hidden: true
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        leaf: true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织--机构',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/dept', component: Department, name: '部门--管理' },
            { path: '/employee', component: Department, name: '员工--管理' },
            { path: '/shop', component: shop, name: '店铺--管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统--管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/permission', component: Department, name: '权限相关管理' },
            { path: '/menu', component: Menu_1, name: '菜单权限管理' },
            { path: '/log', component: syslog, name: '日志--管理' },
            { path: '/type', component: Type, name: '数据字典类型查找' },
            { path: '/detail', component: Detail, name: '数据字典明细查找' },
            { path: '/type_detail', component: T_D, name: '数据字典综合查找' },

        ]
    },
    {
        path: '/',
        component: Home,
        name: '帮助申请',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/page4', component: Page4, name: '在线申请' },
            { path: '/page5', component: Page5, name: '线下申请' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/page6', component: Page6, name: '设置' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;